#ifndef _DEVICE_UART_H_
#define _DEVICE_UART_H_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "driver/uart.h"

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"

#include "esp_log.h"

#include "../Product_Config.h"
#include "../LOG.h" 


#include "../cache_handle.h"


#define UART_TX_DELAY               100

#define UART_RATE                   2*1000*1000  //串口速率
#define UART_NUM          UART_NUM_1 //串口1选择

#define UART1_RX_PIN                14 //接收引脚
#define UART1_TX_PIN                27 //发送引脚

#define BUF_SIZE1                   1024 
#define BUF_SIZE_CACHE              1024 //缓冲接口

#define END_MARKER 0x0A

extern u16 cnt;
extern u8 state_num;
void device_uart_init();
void uart_msg_send(u8* buf,u8 length);
#endif